home *** CD-ROM | disk | FTP | other *** search
- #ifndef __PRINT__
- #define __PRINT__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
-
-
- OSErr PrintDocument(FileRecHndl frHndl, Boolean jobDlg, Boolean firstJob);
- /*
- ** ¶ Print-loop function for AppsToGo document.
- **
- ** INPUT: frHndl
- ** jobDlg
- ** firstJob
- ** RESULT: OSErr
- **
- ** This print-loop function is designed to be called under various situations.
- ** The big issue that it handles is finder printing. If multiple documents
- ** are to be printed from the finder, the user should only see one job dialog
- ** for all the files. (If a job dialog is shown for each file, how does the
- ** user know for which file the dialog is for?) So, for situations where
- ** there is more than one file to be printed, call this code the first time
- ** with the firstJob boolean true. Normally, the jobDlg boolean will also
- ** be true, except that under 7.0, you may be printing in the background.
- ** If this is the case, you don’t want a job dialog for even the first file,
- ** and you should pass in false for the jobDlg boolean in this case. For
- ** files 2-N, you should pass false for both booleans. For regular application
- ** printing, you should pass true for both booleans, since the file is the
- ** first (only) file, and you are not in the background.
- **
- ** After calling this function to print a document, you need to call it
- ** again with a nil document handle. The print record for the first (or only)
- ** document printed is preserved in a static variable. This is so that the
- ** job dialog information can be passed on to documents 2-N in the print job.
- ** Calling this function with the document handle nil tells this function
- ** that you are done printing documents, and that the print record for the
- ** first job can be disposed of. */
-
-
-
- void DonePrinting(void);
- /*
- ** ¶ Called after using PrintDocument for cleanup.
- **
- ** DonePrinting makes sure that PrintDocument gets rid of the prMergeHndl
- ** print record that is used for multiple document printing. Call this
- ** after the last document is printed, or you get a memory leak. */
-
-
-
- OSErr PresentStyleDialog(FileRecHndl frHndl);
- /*
- ** ¶ Given document handle, present style dialog for document.
- **
- ** RESULT: OSErr
- **
- ** Call this from the application to present a style dialog. The changes are
- ** automatically saved in the document. */
-
-
-
- #endif
-